import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'jdsdk_method_channel.dart';

abstract class JdsdkPlatform extends PlatformInterface {
  /// Constructs a JdsdkPlatform.
  JdsdkPlatform() : super(token: _token);

  static final Object _token = Object();

  static JdsdkPlatform _instance = MethodChannelJdsdk();

  /// The default instance of [JdsdkPlatform] to use.
  ///
  /// Defaults to [MethodChannelJdsdk].
  static JdsdkPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [JdsdkPlatform] when
  /// they register themselves.
  static set instance(JdsdkPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }
  Future<String> init({required String appKey, required String appSecret}) async {
    throw UnimplementedError('init() has not been implemented.');
  }
  ///打开京东任意url
  Future<String> openUrl({required String url}) async {
    throw UnimplementedError('openUrl() has not been implemented.');
  }
}
